﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class product_insurance_user_insurance_statement : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ((AfterLogin)this.Master).mainCategory = "ACCOUNTS";
    }
    protected void gvStatement_SelectedIndexChanged(object sender, EventArgs e)
    {
       
        int selectedRow = gvStatement.SelectedIndex;
        GridViewRow row = gvStatement.Rows[selectedRow];
        string certNo = row.Cells[0].Text;
        string policyType = row.Cells[1].Text;
        string choiceOfPlan = row.Cells[2].Text;
        
        if (policyType.StartsWith("H"))
        {
            if ("A".Equals(choiceOfPlan) || "B".Equals(choiceOfPlan) || "C".Equals(choiceOfPlan))
            {

                this.Response.Redirect("~/product/insurance/user/insurance_publicHospitalClaim.aspx?certificateNo=" + certNo);
            }
            else
            {

                this.Response.Redirect("~/product/insurance/user/insurance_privateHospitalClaim.aspx?certificateNo=" + certNo);
            }


        }
        else
        {
            this.Response.Redirect("~/product/insurance/user/insurance_accident_claim.aspx?certificateNo=" + certNo);

        }
        
    }
}